<template>
  <div id="app">
    <div>
      <yx-selector :inputValue="value" :data="list" @updateSearch="updateSearch" :isReload="true" />
    </div>
  </div>
</template>

<script>
export default {
  name: "App",
  components: {},
  data() {
    return {
      value: "",
      list: [
        {
          id: 1,
          value: "react",
          label: "ReactJS",
        },
        {
          id: 2,
          value: "react-hooks",
          label: "React Hooks",
        },
        {
          id: 3,
          value: "vue2",
          label: "Vue2.x",
        },
        {
          id: 4,
          value: "vue3",
          label: "Vue3.0",
        },
        {
          id: 5,
          value: "angular1",
          label: "AngularJS",
        },
        {
          id: 6,
          value: "angular",
          label: "Angular",
        },
      ],
    }
  },
  methods: {
    setItemValue(val) {
      this.inputValue = val
    },
    updateSearch() {
      console.log("重新发送请求")
    },
  },
}
</script>

<style lang="scss"></style>
